public class TestMethodOverloading {
    public static void main(String[] args) {
        System.out.println("The max num between 3 and 4 is "
                + max(3, 4));
        
        System.out.println("The max num between 3.0 and 4.0 is "
                + max(3.0, 4.0));
    }
    
    public static int max( int num1, int num2) {
        if(num1 > num2)
            return num1;
        else
            return num2;
    }
    
    public static double max(double num1, double num2) {
        if(num1 > num2)
            return num1;
        else
            return num2;
    }
}